/*
 * Copyright (c) 2021 Zsj. All rights reserved.
 */

package com.jzz.crawlerweb.handler.generator.impl;

import com.jzz.crawlerweb.handler.generator.ImageHandler;

import java.awt.*;
import java.awt.image.BufferedImage;

public class WhiteBackgroundImageHandler implements ImageHandler {

    @Override
    public BufferedImage handle(BufferedImage bi, Object... args) {
        Graphics2D g2d = bi.createGraphics();
        g2d.setColor(new Color(255, 255, 255, 255));
        g2d.fillRect(0, 0, bi.getWidth(), bi.getHeight());
        return bi;
    }
}
